/*
  Blink
  Turns on an LED on for one second, then off for one second, repeatedly.
 
  This example code is in the public domain.
 */
 
// Pin 13 has an LED connected on most Arduino boards.
// give it a name:
int len = 0;
char inByte = 0;         // incoming serial byte
char chaine[20];
char delim=10;
int minval=55;
int maxval=55;
String conv;
// the setup routine runs once when you press reset:
void setup() {  
  
  Serial.begin(9600);
  Serial1.begin(115200);
  while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only   
}

}

// the loop routine runs over and over again forever:
void loop() {
  
  
  if (Serial.available() > 0) {
    
    len=Serial.readBytesUntil(delim,chaine,20);// get incoming byte:
    conv=chaine;
    len=conv.indexOf(";");
    minval= conv.toInt();
    maxval=conv.substring(len+1).toInt();
   Serial1.print("chaine=");
   Serial1.print(chaine);
   Serial1.print(" minval= ");
   Serial1.print(minval);
   Serial1.print("      maxval= ");
   Serial1.println(maxval);
   
}

}
